package com.hjxr.sysadmin.zsj.service.impl;

import com.hjxr.sysadmin.zsj.domain.Policys;
import com.hjxr.sysadmin.zsj.mapper.PolicysMapper;
import com.hjxr.sysadmin.zsj.service.IPolicysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 政策信息Service业务层处理
 *
 * @date 2021-03-08
 */
@Service
public class PolicysServiceImpl implements IPolicysService {
	@Autowired
	private PolicysMapper policysMapper;

	/**
	 * 查询政策信息
	 *
	 * @param policyId 政策信息ID
	 * @return 政策信息
	 */
	@Override
	public Policys selectPolicysById(Long policyId) {
		return policysMapper.selectPolicysById(policyId);
	}

	/**
	 * 查询政策信息列表
	 *
	 * @param policys 政策信息
	 * @return 政策信息
	 */
	@Override
	public List<Policys> selectPolicysList(Policys policys) {
		return policysMapper.selectPolicysList(policys);
	}

	/**
	 * 新增政策信息
	 *
	 * @param policys 政策信息
	 * @return 结果
	 */
	@Override
	public int insertPolicys(Policys policys) {
		return policysMapper.insertPolicys(policys);
	}

	/**
	 * 修改政策信息
	 *
	 * @param policys 政策信息
	 * @return 结果
	 */
	@Override
	public int updatePolicys(Policys policys) {
		return policysMapper.updatePolicys(policys);
	}

	/**
	 * 批量删除政策信息
	 *
	 * @param policyIds 需要删除的政策信息ID
	 * @return 结果
	 */
	@Override
	public int deletePolicysByIds(Long[] policyIds) {
		return policysMapper.deletePolicysByIds(policyIds);
	}

	/**
	 * 删除政策信息信息
	 *
	 * @param policyId 政策信息ID
	 * @return 结果
	 */
	@Override
	public int deletePolicysById(Long policyId) {
		return policysMapper.deletePolicysById(policyId);
	}
}
